<div style="padding-top:10px; padding-left:20px;">
	<?php
		if (!$listid)
		{
			$to = 'index.php?cmd=login';
			header('Location: '. $to);
		}
		$receiverid = $_GET['receiverid'];
		mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
		@mysql_select_db("$DBName") or die("Unable to select database $DBName");
		$sqlquery 	= "select * from $TReceivers where ReceiverId = '$receiverid' Limit 0, 1";
		$results 	= mysql_query($sqlquery) or die("Unable to query : " . mysql_error());
		$line 		= mysql_fetch_array($results, MYSQL_ASSOC);
		$cellphone	= $line["CellPhone"];
		$shortname	= $line["ShortName"];
		$fullname	= $line["FullName"];

		mysql_free_result($results);
		mysql_close();
	?>

	<form action="<?php print "sms2one.php?listid=$listid&phone=$fromphone" ?>" method="post">
		<fieldset>
			<legend>SMS til <?php print $fullname; ?></legend>
			<br>
			<input type="hidden" name="listid" value="<?php print $listid; ?>" readonly="readonly"/><br>
			<label for="name">Navn</label>
			<input type="text" name="name" value="<?php print $fullname; ?>" readonly="readonly"/><br>
			<label for="cellphone">Til:</label>
			<input type="text" name="cellphone" value="<?php print $cellphone; ?>"/><br>
			<label for="message">Besked:</label>
			<textarea name="message" rows="7">Hej <?php print $shortname; print "\n";?></textarea><br>
			<br>
			<label for="ok">.</label>
			<input type="submit" name="ok" value="Send sms"/>
		</fieldset>
	</form>
</div>